<?php
namespace  Api\Controller;
class AdviseController extends ApiController{
    public function __construct(){
        parent::__construct();
        /** 测试不判断登录 modify by zhang 2016 start  **/
        if (!I('mytest')) {
            !api_login() && response(-94);
            !passed_login() && response(-95);
            !only_login() && response(-96);
        }
        /** 测试不判断登录 modify by zhang 2016 end **/
    }
    public function  addAdvise() {
        $data = array(
            'uid'=>API_UID,
            'content'=>I('content'),
            'create_time'=>NOW_TIME
        );
        $result = M('advise')->add($data);
        $result?response(1):response(-9);
    }
}